package com.bins.langchain.langchain4j.service.impl;

import com.bins.langchain.langchain4j.service.VectorStoreService;
import dev.langchain4j.data.document.Metadata;
import dev.langchain4j.data.embedding.Embedding;
import dev.langchain4j.data.segment.TextSegment;
import dev.langchain4j.model.embedding.EmbeddingModel;
import dev.langchain4j.model.output.Response;
import dev.langchain4j.store.embedding.milvus.MilvusEmbeddingStore;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
public class VectorStoreServiceImpl implements VectorStoreService {

    //private final OllamaEmbeddingModel ollamaEmbeddingModel;

    // private final MilvusEmbeddingStore milvusEmbeddingStore;

    @Override
    public String embedding(String text) {
        return null;
//        Response<Embedding> embed = embeddingModel.embed(text);
//        return milvusEmbeddingStore.add(embed.content());
    }

    @Override
    public String embeddingWithMeta(String text) {
        return null;
//        TextSegment textSegment = TextSegment.from(text, Metadata.from("userId", "1"));
//        Response<Embedding> embed = embeddingModel.embed(textSegment);
//        return milvusEmbeddingStore.add(embed.content(), textSegment);
    }
}
